package com.lepai.service.impl;

import com.lepai.bean.User;
import com.lepai.dao.UserDao;
import com.lepai.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Objects;

/**
 * @author weihaolong
 * @date 2018-11-28 19:54
 * @description
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public boolean addUser(User user) {
       if(Objects.isNull(user)){
           return false;
       }
        return userDao.insertUser(user);
    }
}
